<script setup>
const props = defineProps({
  info: {
    type: Object,
    default: {
      list: [],
      isLoading: false,
      loadStatus: 'loadmore'
    },
  },
  mode: {
    type: String,
    default: 'list'
  },
  text: {
	  type: String,
	  default: '暂无数据'
  },
  loadmoreText: {
	  type: String,
	  default: '加载更多'
  },
  loadingText: {
	  type: String,
	  default: '正在加载...'
  },
  nomoreText: {
	  type: String,
	  default: '没有更多了'
  }
})

</script>

<template>
  <slot />
  <uv-load-more class="loadmore" v-if="info.list.length !== 0 || info.isLoading" :status="info.loadStatus" :loadmoreText="loadmoreText" :loadingText="loadingText" :nomoreText="nomoreText" line />
  <uv-empty class="empty" v-if="info.list.length === 0 && !info.isLoading" :mode="mode" :text="text" />
</template>

<style scoped lang="scss">
.loadmore {
	padding: 100rpx 0;
	box-sizing: border-box;
}

.empty {
	padding: 100rpx 0;
	box-sizing: border-box;
}
</style>
